package net.starwifi.duobao.web.shop;

import net.starwifi.duobao.mvc.BaseController;
import net.starwifi.duobao.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 精选首页
 * Created by Administrator on 2015/11/9.
 */
@Controller("shopIndexController")
@RequestMapping(value = "/shop")
public class IndexController extends BaseController {


    @Autowired
    MemberService memberService;

    /**
     * 商城首页
     */
    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String index(Model model) {
        model.addAttribute("factoryList",memberService.getListData("o.memberType=?1",new Object[]{1})); //商家用户
        return "/shop/index";
    }

}
